The present invention relates to an analog-digital converting device. More particularly, the present invention relates to an analog-digital converting device suitable for converting an analog quantity into a digital quantity, an inverter system which employs the same, and a microcomputer which employs the same.
A PWM inverter control system for controlling a motor is known. In this system, a PWM signal is generated on the basis of a motor current, and a PWM inverter is controlled according to the PWM signal. Since the motor current, an output current of the PWM inverter, pulsates, when the PWM inverter is controlled by the PWM signal, it is necessary for the fundamental wave components of the motor current to be detected and for the PWM signal to be generated on the basis of the detected value. For example, the vector control of an induction motor adopts an Id, Iq current control system in which a magnetic flux component current Id and a torque component current Iq are calculated from the motor current of each phase. Also, in the PWM inverter control system which employs vector control, in order to protect the components, it is necessary for an analog quantity, such as a temperature, to be detected in addition to the motor current. Hence, the aforementioned control systems generally employ a single chip microcomputer in which a CPU, a timer and a peripheral processing module, such as an AD conversion module, are incorporated, and the analog quantity is converted into a digital quantity by the incorporated AD conversion module.
The AD conversion module for detecting a plurality of analog quantities includes an analog multiplexer, a single sample holder, an AD converter and a register for storing the results of the conversion. The AD conversion module is designed to perform a single conversion operation in which AD conversion is conducted on a designated single analog quantity and a scan conversion operation in which AD conversion is conducted on a plurality of analog quantities in sequence. Scan conversion operation is generally used for detection of a motor current, and single conversion operation is employed for measurement of temperature or the like.
The method of detecting the fundamental wave component of a pulsating motor current has been proposed in, for example, Japanese Patent Laid-Open No. Sho 58-198165.
However, in the above-mentioned conventional techniques, concurrence of the scan conversion operation in which a motor current is converted into digital data, and the single conversion operation in which the temperature is converted into digital data is not taken into consideration. Thus, when the two conversion operations are instructed concurrently, the fundamental wave components of the motor current may not be reliably detected. That is, the scan conversion operation for detecting the motor currents is executed by the interrupt process which is synchronous with the PWM signal, and the single conversion operation for measurement of the temperature or the like is executed asynchronously with the scan conversion operation. Thus, when the scan conversion operation is requested while the single conversion operation in which the analog quantity, such as the temperature, is converted into digital quantity is being activated, the scan conversion operation may not be activated. In that case, the scan conversion operation is conducted after the single conversion operation is completed, and this precludes detection of the motor current synchronously with the PWM synchronous signal.